package com.hjj.springboot.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

import java.util.Date;
import java.util.List;

@TableName("t_talk")
@Data
public class Talk {

    @ExcelProperty("论坛编号")
    @ColumnWidth(20)
    private Integer id;

    @ExcelProperty("论坛内容")
    @ColumnWidth(30)
    private String content;

    @ExcelProperty("微信用户OpenId")
    @ColumnWidth(30)
    private String uid;

    @ExcelProperty("发布时间")
    @ColumnWidth(20)
    @JsonSerialize(using=CustomDateTimeSerializer.class)
    private Date upTime;

    @ExcelIgnore
    @TableField(exist=false,select = false)
    private List<TalkDetail> talkDetailsList;

    @ExcelIgnore
    @TableField(exist=false,select = false)
    private List<TalkImage> talkImagesList;

    @ExcelIgnore
    @TableField(exist=false,select = false)
    private WxUserInfo wxUserInfo;
}
